<?php
//首页
function indexAction(){
	if(isset($_REQUEST[change])){
		$img=saveUploadedFile("file_upload","my/p".$_SESSION[openid].".jpg");
		mSetMy(array("头像"=>$img));
	}
	$you=mGetMy();
	$album=mGetAlbum();
	out_m(array("you"=>$you,"album"=>$album));
}
// 获取回复
function replyAction(){
	$reply=mGetReply($_SESSION[openid]);
	mSetMy(array("查看回复时间"=>date('Y-m-d h:m:s',strtotime('now'))));
	out_m(array('reply'=>$reply));
}
// 获取评论
function reviewAction(){
	$review=mGetReview($_SESSION[openid]);
	mSetMy(array("查看评论时间"=>date('Y-m-d h:m:s',strtotime('now'))));
	out_m(array('review'=>$review));
}
// 系统消息
function sysmessAction(){
	$sysmess=mGetSysmess($_SESSION[openid]);
	mSetMy(array("查看系统消息时间"=>date('Y-m-d h:m:s',strtotime('now'))));
	out_m(array('sysmess'=>$sysmess));
}
// 红心
function heartAction(){
	$heart=mGetHeart($_SESSION[openid]);
	mSetMy(array("查看红心时间"=>date('Y-m-d h:m:s',strtotime('now'))));
	out_m(array('heart'=>$heart));
}
// 眨眼
function blinkAction(){
	$blink=mGetBlink($_SESSION[openid]);
	mSetMy(array("查看眨眼时间"=>date('Y-m-d h:m:s',strtotime('now'))));
	out_m(array('blink'=>$blink));
}
// 积分规则
function rulesAction(){
	out_m();
}
// 获取我的积分详情
function detailAction(){
	$detail=mGetDetail($_SESSION[openid]);
	out_m($detail);
}
function changeAction(){
	$change=mGetChange();
	out_m(array('change'=>$change));
}
function mymessAction(){
	$mymess=mGetMymess();
	out_m(array('mymess'=>$mymess));
}
function acountAction(){
	if (isset($_REQUEST[_openid])) {
		if($_REQUEST[_openid]!=$_SESSION[openid]){
			mSetVisit($_REQUEST[_openid]);
		}
		$id=$_REQUEST[_openid];
	}else{
		$id=$_SESSION[openid];
	}
	$acount=mGetAcount($id);
	$detail=mGetDetail($id);
	out_m(array('acount'=>$acount,'detail'=>$detail));
}
// 去哪里
function gotowhereAction(){
	out_m();
}